<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <div th:insert="commen/head :: header">
    </div>
    <link rel="stylesheet" th:href="@{/css/myCss.css}">
</head>
<body style="background-color: rgb(242,244,247);">
    <div th:insert="commen/navigationBar :: topNavBar"></div>

<div class="container" style="margin-top: 20px;">
    <div class="row">

        <div class="col-md-1">
            <div style="position: fixed;width: 15%;top: 64px;left: 25px;background: #3c3c3c" class="jj j">
                <ul class="nav nav-pills nav-stacked">
                    <div style="height: 100px; background: #5bc0de; height: 140px;" class="j text-center">
                        <a th:href="@{/editUser}" style="text-decoration: none">
                            <img th:src="@{'img/' + ${session.user.userImg}}" alt="" style=" border: 6px rgb(51,122,183) solid; width: 80px; height: 80px; border-radius: 100%; margin-top: 10px;"><br>
                            <p style="font-size: 18px" th:text="${session.user.getUserName()}"></p>
                        </a>
                    </div>
                    <li role="presentation" class="active"><a>
                        <p>专业: [[${session.user.major}]]</p>
                    </a></li>
                    <li><a>
                        <p>班级: [[${session.user.gradeClass}]]</p>
                    </a></li>
                </ul>
            </div>
        </div>

        <div class="col-md-11" style="background-color: #ffffff">

            <ul id="myTab" class="nav nav-tabs">
                <li>
                    <a href="#homework" data-toggle="tab" style="margin-left: 10px;margin-right: 10px; font-size: 18px; font-weight: bold;">
                        我学的课
                    </a>
                </li>
                <li>
                    <a href="#questionsBank" data-toggle="tab" style="font-size: 18px; font-weight: bold;" >
                        我教的课
                    </a>
                </li>
            </ul>

            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade" id="homework">
                    <div class="col-md-12">
                        <button style="font-size: 18px; margin-top: 10px; margin-bottom: 10px;" type="button" class="btn btn-primary" data-toggle="modal" data-target="#Modal_student">
                            添加课程
                        </button>
                    </div>
                    <div class="col-sm-6 col-md-4" th:each="course : ${studyCourse}">
                        <div class="thumbnail">
                            <!--                        <a th:href="@{'/toStudentCourse/' + ${course.courseId}}">-->
                            <a th:href="@{'/getStudentHomework/' + ${course.courseId}}">
                                <img th:src="@{'img/' + ${course.courseImg}}" style="width: 285px; height: 190.55px;">
                            </a>
                            <div class="caption">
                                <h4 th:text="${course.courseName}"></h4>
                                <h5 th:text="${course.courseTeacherName} + '老师'"></h5>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="tab-pane fade" id="questionsBank">
                    <div class="col-md-12">
                        <button style="font-size: 18px; margin-top: 10px; margin-bottom: 10px;" type="button" class="btn btn-primary" data-toggle="modal" data-target="#Modal_teacher">
                            新建课程
                        </button>
                    </div>
                    <div class="col-sm-6 col-md-4" th:each="course : ${learnCourse}">
                        <div class="thumbnail">
                            <!--                        <a th:href="@{/toStudentCourse(courseId=${course.courseId})}">-->
                            <a th:href="@{'/getHomework/' + ${course.courseId}}">
                                <!--                        <a th:href="@{'/toTeacherCourse/' + ${course.courseId}}">-->
                                <img th:src="@{'img/' + ${course.courseImg}}" style="width: 285px; height: 190.55px;">
                                <!--                            @{'/employee/'+${employee.id}}-->
                            </a>
                            <div class="caption">
                                <h4 th:text="${course.courseName}"></h4>
                                <h5 th:text="${course.courseTeacherName} + '老师'"></h5>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

    <script>
        let page = 0;
        $(function () {
            $('#myTab li:eq('+page+') a').tab('show');
        });
    </script>
<!--模态框 添加课程-->
<div th:insert="commen/modal_add :: modal">

</div>
</body>
</html>